Encryption of memory in a device, such as a personal computer, a smart mobile phone, and so on, may be used to protect data stored in the memory when the device is operating, lost, stolen, and so on. Encryption of the memory may, however, remain vulnerable since the data may be corrupted by an adversary via an initial and/or repeated memory corruption attack. Thus, a processor may execute corrupt data and cause an array of undesirable effects such as, for example, a password login attempt to erroneously succeed, fail, etc., an application to misbehave, crash, etc., the device to misbehave, crash, etc., and so on. Conventional techniques may implement various strategies to maintain integrity of the memory in an attempt to minimize malicious changes to encrypted data (e.g., stored data). One technique may include utilizing parity. While being an in-line approach and having a relatively low storage cost, parity may be deterministic insofar as the adversary may successfully guess how to change bits of stored data to pass a check. Another technique may involve using relatively large codes to verify the integrity of stored data, which may not be deterministic to the adversary but may include relatively high storage cost. In addition, using codes each time data is fetched from the memory may result in a relatively large number of memory access events causing relatively high retrieval cost, performance degradation, additional power consumption, and so on.